ninab416 2.2.1
Loading...
Searching...
No Matches
NINA-B416 Click Driver

API for configuring and manipulating NINA-B416 Click driver. More...

Topics

 NINA-B416 Device Settings
 Settings for registers of NINA-B416 Click driver.
 NINA-B416 MikroBUS Map
 MikroBUS pin mapping of NINA-B416 Click driver.

Functions

void ninab416_cfg_setup (ninab416_cfg_t *cfg)
 NINA-B416 configuration object setup function.
err_t ninab416_init (ninab416_t *ctx, ninab416_cfg_t *cfg)
 NINA-B416 initialization function.
err_t ninab416_generic_write (ninab416_t *ctx, uint8_t *data_in, uint16_t len)
 NINA-B416 data writing function.
err_t ninab416_generic_read (ninab416_t *ctx, uint8_t *data_out, uint16_t len)
 NINA-B416 data reading function.
void ninab416_set_rst_pin (ninab416_t *ctx, uint8_t state)
 NINA-B416 set RST pin function.
void ninab416_reset_device (ninab416_t *ctx)
 NINA-B416 reset device function.
void ninab416_set_cts_pin (ninab416_t *ctx, uint8_t state)
 NINA-B416 set CTS pin function.
uint8_t ninab416_get_rts_pin (ninab416_t *ctx)
 NINA-B416 get RTS pin function.
void ninab416_set_dsr_pin (ninab416_t *ctx, uint8_t state)
 NINA-B416 set DSR pin function.
uint8_t ninab416_get_dtr_pin (ninab416_t *ctx)
 NINA-B416 get DTR pin function.
void ninab416_cmd_run (ninab416_t *ctx, uint8_t *cmd)
 NINA-B416 cmd run function.
void ninab416_cmd_set (ninab416_t *ctx, uint8_t *cmd, uint8_t *value)
 NINA-B416 cmd set function.
void ninab416_cmd_get (ninab416_t *ctx, uint8_t *cmd)
 NINA-B416 cmd get function.

Detailed Description

API for configuring and manipulating NINA-B416 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ ninab416_cfg_setup()

void ninab416_cfg_setup ( ninab416_cfg_t * cfg)

NINA-B416 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See ninab416_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ ninab416_cmd_get()

void ninab416_cmd_get ( ninab416_t * ctx,
uint8_t * cmd )

NINA-B416 cmd get function.

This function is used to get the value of a given command from the Click module.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]cmd: Command string, see NINAB416_CMD_x definitions.
Returns
None.
Note
None.

◆ ninab416_cmd_run()

void ninab416_cmd_run ( ninab416_t * ctx,
uint8_t * cmd )

NINA-B416 cmd run function.

This function sends a specified command to the Click module.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]cmd: Command string, see NINAB416_CMD_x definitions.
Returns
None.
Note
None.

◆ ninab416_cmd_set()

void ninab416_cmd_set ( ninab416_t * ctx,
uint8_t * cmd,
uint8_t * value )

NINA-B416 cmd set function.

This function sets a value to a specified command of the Click module.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]cmd: Command string, see NINAB416_CMD_x definitions.
[in]value: Value string.
Returns
None.
Note
None.

◆ ninab416_generic_read()

err_t ninab416_generic_read ( ninab416_t * ctx,
uint8_t * data_out,
uint16_t len )

NINA-B416 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ ninab416_generic_write()

err_t ninab416_generic_write ( ninab416_t * ctx,
uint8_t * data_in,
uint16_t len )

NINA-B416 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ninab416_get_dtr_pin()

uint8_t ninab416_get_dtr_pin ( ninab416_t * ctx)

NINA-B416 get DTR pin function.

This function returns the data terminal ready pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ ninab416_get_rts_pin()

uint8_t ninab416_get_rts_pin ( ninab416_t * ctx)

NINA-B416 get RTS pin function.

This function returns the ready to send pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ ninab416_init()

err_t ninab416_init ( ninab416_t * ctx,
ninab416_cfg_t * cfg )

NINA-B416 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See ninab416_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ninab416_reset_device()

void ninab416_reset_device ( ninab416_t * ctx)

NINA-B416 reset device function.

This function resets the device by toggling the reset pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ ninab416_set_cts_pin()

void ninab416_set_cts_pin ( ninab416_t * ctx,
uint8_t state )

NINA-B416 set CTS pin function.

This function sets the clear to send pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ ninab416_set_dsr_pin()

void ninab416_set_dsr_pin ( ninab416_t * ctx,
uint8_t state )

NINA-B416 set DSR pin function.

This function sets the data set ready pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ ninab416_set_rst_pin()

void ninab416_set_rst_pin ( ninab416_t * ctx,
uint8_t state )

NINA-B416 set RST pin function.

This function sets the reset pin logic state.

Parameters
[in]ctx: Click context object. See ninab416_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.